{% extends "base_submenu.html" %}{% load base_tags %}
{% block title %}Aktivierungsmail erneut versenden{% endblock %}
{% block submenu %}
	{% if not user.is_authenticated %}
	<button type="button" onclick="javascript:location.href='{% url account_login %}'">Anmelden</button>
	<button type="button" onclick="javascript:location.href='{% url account_register %}'">Neuen Account erstellen</button>
	{% else %}
	<button type="button" onclick="javascript:location.href='{% url account_password_reset %}'">Mein Passwort zurücksetzen</button>
	{% endif %}
{% endblock %}
{% block content %}
	{% if form %}
		{% hintblock %}
		Hier kannst Du Dir eine neue Aktivierungsmail schicken lassen. Mit dem Link darin kannst Du Deinen Account
		validieren lassen, nachdem Du Dich registriert oder Deine Mail-Adresse geändert hast.
		{% endhintblock %} 
		<form method="post" action="{% url resend_activation_mail %}">
		{% csrf_token %}
		{% if form.errors %}
			{% errorblock %}
				{% for field in form %}
					{% if field.errors %}
						{{ field.label }}:
						{% for error in field.errors %}{{ error }}<br />{% endfor %}
					{% endif %}
				{% endfor %}
			{% enderrorblock %}
		{% endif %}
		<table>
		    {% for field in form %}
		    <tr>
		        <td>{{ field.label_tag }}</td>
		        <td>{{ field|safe }}</td>
		    </tr>
		    {% endfor %}        
		    <tr>
		        <td>&nbsp;</td>
		        <td><input type="submit" value="Mail erneut versenden" /></td>
		    </tr>
		</table>
		</form>
		<script type="text/javascript">
			$(document).ready(function() {
				$('#id_email').focus();
			});
		</script>
	{% else %}
		{% hintblock %}
			{{ msg|safe }}
		{% endhintblock %}
	{% endif %}
{% endblock %}
